package com.cloudfun.campusshare.entity;

import com.cloudfun.campusshare.common.constant.KjtAuditStatus;
import com.cloudfun.campusshare.common.constant.SettleType;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * Created by Huqin on 2020/8/13
 */
@Data
@Entity
@Table(name = "settle_type_change_application")
@org.hibernate.annotations.Table(appliesTo = "settle_type_change_application", comment = "子商户更改结算方式申请")
public class SettleTypeChgApplicationEntity extends BaseEntity {

    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

    @Column(columnDefinition = ("varchar(40) not null comment '子商户Id'"))
    private String subMerchantId;

    @Column(columnDefinition = ("varchar(40) not null comment '用户Id'"))
    private String userId;

    @Column(columnDefinition = ("varchar(32) not null comment '结算方式'"))
    @Enumerated(EnumType.STRING)
    private SettleType settleType;

    @Column(columnDefinition = ("int(10) default null comment '委托提现起结金额'"))
    private Integer entrustWithdrawalAmount;

    @Column(columnDefinition = ("varchar(8) not null comment '状态'"))
    @Enumerated(EnumType.STRING)
    private KjtAuditStatus status;

    @Column(columnDefinition = ("varchar(128) default null comment '失败原因'"))
    private String failReason;
}
